package com.example.xd.Entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.File;
import java.time.LocalDateTime;

public class Video {
    @TableId(type = IdType.AUTO)
    private int id;
    private String name;
    private String description;
    private Integer duration;
    private Integer UserId;
    @DateTimeFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss.SSSX")
    private LocalDateTime UploadTime;
    private String videoUrl;
    private String thumbUrl;
    private String category;
    private String path = "D:" + File.separator + "fgobb" + File.separator + "upload_video";;
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public Integer getUserId() {
        return UserId;
    }

    public void setUserId(Integer userId) {
        UserId = userId;
    }

    public LocalDateTime getUploadTime() {
        return UploadTime;
    }

    public void setUploadTime(LocalDateTime uploadTime) {
        UploadTime = uploadTime;
    }

    public String getVideoUrl() {
        return videoUrl;
    }

    public void setVideoUrl(String videoUrl) {
        this.videoUrl = videoUrl;
    }

    public String getThumbUrl() {
        return thumbUrl;
    }

    public void setThumbUrl(String thumbUrl) {
        this.thumbUrl = thumbUrl;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    @Override
    public String toString() {
        return "Video{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", description='" + description + '\'' +
                ", duration=" + duration +
                ", UserId=" + UserId +
                ", UploadTime=" + UploadTime +
                ", videoUrl='" + videoUrl + '\'' +
                ", thumbUrl='" + thumbUrl + '\'' +
                ", category='" + category + '\'' +
                '}';
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }
}
